package com.hmall.search.pojo;

import lombok.Data;

/**
 *
 */
@Data
public class R {
    private String msg;
    private int code;
    private Object data;

    public static R success(Object data){
        R r = new R();
        r.setCode(200);
        r.setData(data);
        return r;
    }

    public static R success(){
        R r = new R();
        r.setCode(200);
        return r;
    }

    public static R error(){
        R r = new R();
        r.setCode(500);
        return r;
    }
}
